<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: widu
  Date: Sep 3, 2013
  Time: 9:45:42 AM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--<style type="text/css">
    .title {
        text-align: center;
        clear: both;
        font-size: 14pt;
        background: #DAC083;
        padding: 5px;
        border-radius: 15px 15px 0 0;
        margin: -10px -10px 10px -10px;
    }
</style>--%>

<script type="text/javascript">


    $(function () {
        $('#cancelBtnId').val($('#cancelBtn').val());

    });

    $(document).ready(function () {
        $('.land-table').dataTable({
            "sPaginationType":"full_numbers",
            "bDestroy":true,
            "oLanguage":{
                "sZeroRecords":$('#no-record').val(),
                "sLengthMenu":$('#display').val() + " _MENU_ " + $('#records').val(),
                "sSearch":$('#search').val(),
                //"sInfo":$('#showing').val() + " _START_ " + $('#to').val() + " _END_ " + $('#of').val() + " _TOTAL_ " + $('#entries').val(),
                "sInfo":"" ,
                "sInfoEmpty":$('#no-record').val(),
                "oPaginate":{
                    "sFirst":$('#first').val(),
                    "sLast":$('#last').val(),
                    "sNext":$('#next').val(),
                    "sPrevious":$('#previous').val()
                }
            },
            "fnDrawCallback":function () {
                if ($('.dataTables_paginate span span.paginate_button').size()) {
                    $('.dataTables_paginate')[0].style.display = "block";
                } else {
                    $('.dataTables_paginate')[0].style.display = "none";
                }
            }
        });


    });


</script>

<div id="land-registration-module-home-title" class="module-home-title">
    <font size="4pt"><s:label value="%{getText('permit_lands_for_grant.label')}"/></font>
</div>
<s:form>
    <div id="printCancelBtn" class="form-button-div right-align">
        <input type="button" id="cancelBtnId" onclick="window.close();"/>
    </div>
</s:form>


<table id="land-table" class="width-100 margin-10-auto table land-table">
    <thead>
    <tr class="center-align table-header">
        <th><s:label value="%{getText('slmsSerialNumber.label')}"/></th>
        <th><s:label value="%{getText('name_of_the_land.label')}"/></th>
        <th><s:label value="%{getText('plan_no.label')}"/></th>
        <th><s:label value="%{getText('lot_no.label')}"/></th>
        <th><s:label value="%{getText('permit_no.label')}"/></th>
    </tr>
    </thead>
    <tbody>
    <s:iterator status="lands" value="alienationList">
        <tr class="<s:if test="#status.odd == true">table-row-odd</s:if><s:else>table-row-even</s:else>">
            <td width="80px" class="center-align"><s:property value="land.id"/></td>
            <td><s:property value="land.nameOfTheLand"/></td>
            <td width="80px" class="center-align"><s:property value="land.planNumber"/></td>
            <td width="80px" class="center-align"><s:property value="land.lotNumber"/></td>
            <td width="80px" class="center-align"><s:property value="referenceNo"/></td>
        </tr>
    </s:iterator>
    </tbody>
</table>

<%-- Localization text for data tables --%>
<s:hidden id="display" value="%{getText('display.label')}"/>
<s:hidden id="records" value="%{getText('records.label')}"/>
<s:hidden id="search" value="%{getText('search.label')}"/>
<s:hidden id="no-record" value="%{getText('no_record.label')}"/>
<s:hidden id="showing" value="%{getText('showing.label')}"/>
<s:hidden id="to" value="%{getText('to.label')}"/>
<s:hidden id="of" value="%{getText('of.label')}"/>
<s:hidden id="entries" value="%{getText('entries.label')}"/>
<s:hidden id="first" value="%{getText('first.label')}"/>
<s:hidden id="last" value="%{getText('last.label')}"/>
<s:hidden id="next" value="%{getText('next.label')}"/>
<s:hidden id="previous" value="%{getText('previous.label')}"/>


<s:hidden id="cancelBtn" value="%{getText('cancel.label')}"/>
